import {defineEventHandler} from "h3";
import fs from 'fs';
type MdFile = {
    name: string,
    content?: string
};
export default defineEventHandler(async (event) => {
    let params: MdFile = getQuery(event);
    try {
        fs.unlinkSync(`${process.cwd()}/public/mds/${params.name}.md`);
        return {
            msg: '删除成功'
        }
    } catch (e) {
        return e;
    }
})
